﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Data;
using OgilvyOne.Model;
using OgilvyOne.DALFactory;

namespace OgilvyOne.BLL
{
    public class ArticleCollection
    {
        public bool Add(int aid, int memberid)
        {
            if (ArticleCollectionFactory.create().Add(aid, memberid))
            {
                return CmsArticleFrontFactory.create().addColls(aid);
            }
            return false;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="aid">0,则不查</param>
        /// <param name="memberid">0,则不查</param>
        /// <returns></returns>
        public DataSet GetCollectionList(int aid, int memberid)
        {
            return ArticleCollectionFactory.create().GetCollectionList(aid, memberid);
        }
        /// <summary>
        /// 是否已收藏
        /// </summary>
        /// <param name="aid"></param>
        /// <param name="memberid"></param>
        /// <returns></returns>
        public bool IsExitis(int aid, int memberid)
        {
            return ArticleCollectionFactory.create().IsExitis(aid, memberid);
        }
        public bool Delete(int cid)
        {
            return ArticleCollectionFactory.create().Delete(cid);
        }
    }
}
